#************************************************************************************* # PROCEDURE global ADOTIME_TO_SEC string:timeexp seconds:reference # # transforming a TIME format string into the amount of seconds # # Input: <"00:000:00:00:00"> (string) # Output:<0> (integer) # # since this procedure evaluates the amount of seconds using # the company specific times, the following two variables have # to be specified using the values from the library attributes. # like this: # # wdpy:251 # working days per year # whpd:7.7 # working hours per day # # For other purpose you may take the "normal" 360/24 duration # as well #*************************************************************************************# { SET years: (VAL(token(timeexp,0,":"))) SET days: (VAL(token(timeexp,1,":"))) SET hours: (VAL(token(timeexp,2,":"))) SET min: (VAL(token(timeexp,3,":"))) SET sec: (VAL(token(timeexp,4,":"))) SET seconds: (((((((((years)*wdpy)+(days))*whpd)+(hours))*60)+(min))*60)+(sec)) } #*************************************************************************************#